package com.umeox.moto.watch.themes.skin.entity;

import static com.umeox.moto.watch.themes.skin.entity.AttrFactory.TRACK_COLOR;

import android.view.View;

import com.google.android.material.progressindicator.CircularProgressIndicator;
import com.umeox.moto.watch.themes.skin.loader.ResourceManager;


public class TrackColorAttr extends SkinAttr {

	@Override
	public void apply(View view) {
        if (view instanceof CircularProgressIndicator) {
            CircularProgressIndicator circularProgressIndicator = (CircularProgressIndicator) view;
            if(RES_TYPE_NAME_COLOR.equals(attrValueTypeName)){
                if(TRACK_COLOR.equals(attrName)){
                    circularProgressIndicator.setTrackColor(ResourceManager.getInstance().getColor(attrValueRefId));
                }
            }
        }
	}
}
